package com.d09cnpm2.group8;

import android.app.Activity;
import android.content.Intent;
import android.os.Bundle;
import android.view.View;
import android.widget.Button;
import android.widget.TextView;

import com.d09cnpm2.group8.map.MapV2Activity;
import com.d09cnpm2.group8.map.R;

public class DetailScreen extends Activity {
    Button viewMap;
    String name;
double lat, lng;
    @Override
    protected void onCreate(Bundle savedInstanceState) {
	super.onCreate(savedInstanceState);
	setContentView(R.layout.details);
	Bundle b = getIntent().getExtras();
	TextView tit = (TextView) findViewById(R.id.tv_title);
	name = b.getString("name");
	tit.setText(name);
	TextView desc = (TextView) findViewById(R.id.description);
	lat = b.getDouble("lat");
	lng = b.getDouble("lng");
	desc.setText(b.getString("desc") + "lat: " + lat + " long: " + lng);

    }

    public void onClick(View view) {

	Intent intent = new Intent(DetailScreen.this, MapV2Activity.class);
	intent.putExtra("lat", lat);
	intent.putExtra("lng", lng);
	startActivity(intent);
    }
}